package services;

import java.util.List;

import javax.inject.Inject;

import mappers.UpdatesMapper;
import models.Updates;

public class UpdatesService {
    
    @Inject
    public UpdatesMapper updatesMapper;

    public List<Updates> getNewsByUser(String username) {
        List<Updates> updates = updatesMapper.getUpdatesByUser(username);
        return updates;
    }
    
    public List<Updates> getNotifications(Updates update) {
    	List<Updates> updates = updatesMapper.getNotifications(update);
        return updates;
	}
    

	public void shareJourney(Updates update) {
		updatesMapper.shareJourney(update);
		
	}
	public void addfriend(Updates update) {
		updatesMapper.addfriend(update);
		
	}
	public void sharePosition(Updates update) {
		updatesMapper.sharePosition(update);
		
	}
	public void updateVisited(int share_id ) {
		updatesMapper.updateVisited(share_id);
		
	}
}
